package bud.taskmanager.task.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import bud.taskmanager.task.dao.TaskDao;
import bud.taskmanager.task.dto.Task;

@Service(value = "TaskService")
public class TaskServiceImpl implements TaskService {
	
	@Autowired
	private TaskDao taskDao;
	
	@Override
	public List<Task> findAllTasks() {
		return taskDao.findAllTasks();
	}

	@Override
	public Task findTask(int id) {
		return taskDao.findTask(id);
	}

	@Override
	public void createTask(Task task) {
		taskDao.createTask(task);
	}

	@Override
	public void updateTask(Task task) {
		taskDao.updateTask(task);
	}

	@Override
	public void deleteTask(int id) {
		taskDao.deleteTask(id);
	}

}
